Web-based applications are applications that may be accessed over a network such as the Internet. With the rising popularity of the Internet, web-based applications provide developers and content providers a number of advantages. For example, web-based applications allow the primary processing responsibilities associated with the application's functionality to be handled at the server. As a result, a client with limited processing capabilities may still access and benefit from the functionality of processing-intensive applications. Moreover, web-based applications are much easier to update because the updates take place on the host server, foregoing the need to update software at each client.
There are numerous methods by which a client may send data to and receive data from a web-based application. For example, a web-based application may notify a client of new events using a push service. A push service allows the server to initiate communication with the client, as opposed to a traditional pull service in which the client must initiate communications. Using push services, a server may immediately send new events to a client, as opposed to waiting for a client request for the data. Long polling is one method for implementing push functionality. In long polling, a client makes a request for data from the server, but instead of responding immediately, the server holds the request until there is a new event about which the server needs to notify the client. Once the client receives a response regarding the new event, it can immediately make another request for data so that there is always a pending request to which the server may respond with new event data.